﻿using System.Web;
using System.Web.Optimization;

namespace ZJK
{
    public class BundleConfig
    {
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/common").Include(
                        "~/Scripts/common.js"));

            
            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));

            bundles.Add(new StyleBundle("~/Content/themes/ui-lightness/css").Include(
                        "~/Content/themes/ui-lightness/jquery-ui.css"));

            bundles.Add(new ScriptBundle("~/bundles/ztree/js").Include(
                        "~/Scripts/zTree/jquery.ztree.all-3.5.min.js"));
            bundles.Add(new StyleBundle("~/bundles/ztree/css").Include(
                        "~/Scripts/zTree/zTreeStyle.css"));


            #region Bootstrap和VueJs用到的模块
            // Bootstrap和VueJs用到的模块
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                "~/Scripts/modernizr-*"
                ));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                "~/Scripts/jquery-ui-{version}.js"
                ));

            bundles.Add(new StyleBundle("~/bundles/font-awesome").Include(
                "~/Content/font-awesome.min.css"
                ));

            bundles.Add(new StyleBundle("~/bundles/css").Include(
                "~/Content/font-awesome.min.css",
                "~/Content/Site.css"
                ));

            //加载jQuery-1
            bundles.Add(new ScriptBundle("~/bundles/jQuery1").Include(
                "~/Scripts/jquery-1.*"
                ));

            //加载jQuery-2
            bundles.Add(new ScriptBundle("~/bundles/jQuery2").Include(
                "~/Scripts/jquery-2.*"
                ));

#if DEBUG
            bundles.Add(new ScriptBundle("~/bundles/knockoutjs").Include(
                "~/Scripts/knockout-{version}.debug.js",
                "~/Scripts/knockout.mapping-latest.debug.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/respond").Include(
                "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/bundles/css/bootstrap3").Include(
                "~/Content/bootstrap.css",
                "~/Content/bootstrap-datetimepicker.css"
                ));

            //加载BootStrap3
            bundles.Add(new ScriptBundle("~/bundles/bootstrap3").Include(
                "~/Scripts/bootstrap.js",
                "~/Scripts/bootbox.js",
                "~/Scripts/moment.js",
                "~/Scripts/moment-with-locales.js",
                "~/Scripts/bootstrap-datetimepicker.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/json2").Include(
                "~/Scripts/json2.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/vue").Include(
                "~/Scripts/vue.js"));
#else
            bundles.Add(new ScriptBundle("~/bundles/knockoutjs").Include(
                "~/Scripts/knockout-{version}.js",
                "~/Scripts/knockout.mapping-latest.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/respond").Include(
                "~/Scripts/respond.min.js"));

            bundles.Add(new StyleBundle("~/bundles/css/bootstrap3").Include(
                "~/Content/bootstrap.min.css",
                "~/Content/bootstrap-datetimepicker.min.css"
                ));

            //加载BootStrap3
            bundles.Add(new ScriptBundle("~/bundles/bootstrap3").Include(
                "~/Scripts/bootstrap.min.js",
                "~/Scripts/bootbox.min.js",
                "~/Scripts/moment.min.js",
                "~/Scripts/moment-with-locales.min.js",
                "~/Scripts/bootstrap-datetimepicker.min.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/json2").Include(
                "~/Scripts/json2.min.js"
                ));

            bundles.Add(new ScriptBundle("~/bundles/vue").Include(
                "~/Scripts/vue.min.js"));
#endif

            #endregion
        }
    }
}